package com.crm.model;

import org.apache.commons.lang.builder.ToStringBuilder;

import java.io.Serializable;
import java.util.Date;

/**
 * @author <a href="mailto:huang0510@hotmail.com">Huang Huang</a>
 * @version $Id$
 * @hibernate.class table="CUSTOMERS"
 */
public class Customer implements Serializable {
    
    private String id;
    private String customerName;
    private String country;
    private String province;
    private String city;
    private String address;
    private String website;
    private Date dateOfSave;
    private String weekOfYear;
    private String comments;
    private User user;
    private LCustSource source;
    private LCustLevel level;
    private LProduct product;

    public Customer() {
    }

    public void setId(String id) {
        this.id = id;
    }

    public void setCustomerName(String customerName) {
        this.customerName = customerName;
    }

    public void setCountry(String country) {
        this.country = country;
    }

    public void setProvince(String province) {
        this.province = province;
    }

    public void setCity(String city) {
        this.city = city;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public void setWebsite(String website) {
        this.website = website;
    }

    public void setLevel(LCustLevel level) {
        this.level = level;
    }

    public void setDateOfSave(Date dateOfSave) {
        this.dateOfSave = dateOfSave;
    }

    public void setWeekOfYear(String weekOfYear) {
        this.weekOfYear = weekOfYear;
    }

    public void setSource(LCustSource source) {
        this.source = source;
    }

    public String getId() {
        return id;
    }

    public String getCustomerName() {
        return customerName;
    }

    public String getCountry() {
        return country;
    }

    public String getProvince() {
        return province;
    }

    public String getCity() {
        return city;
    }

    public String getAddress() {
        return address;
    }

    public String getWebsite() {
        return website;
    }

    public LCustLevel getLevel() {
        return level;
    }

    public Date getDateOfSave() {
        return dateOfSave;
    }

    public String getWeekOfYear() {
        return weekOfYear;
    }

    public String getComments() {
        return comments;
    }

    public User getUser() {
        return user;
    }

    public void setUser(User user) {
        this.user = user;
    }

    public LCustSource getSource() {
        return source;
    }

    public void setComments(String comments) {
        this.comments = comments;
    }

    public LProduct getProduct() {
        return product;
    }

    public void setProduct(LProduct product) {
        this.product = product;
    }


    public String toString() {
        return new ToStringBuilder(this)
                .append("id", getId())
                .append("customerName", getCustomerName())
                .append("country", getCountry())
                .append("province", getProvince())
                .append("city", getCity())
                .append("address", getAddress())
                .append("website", getWebsite())
                .append("product", getProduct())
                .append("customerLeve", getLevel())
                .append("dateOfSave", getDateOfSave())
                .append("user", getUser().toString())
                .append("weekOfYear", getWeekOfYear())
                .append("comments", getComments())
                .append("source", getSource())
                .toString();
    }
}
